﻿using System;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Text;

namespace Jy123.Web.Images
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    public class XMLDemo : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            StringBuilder sb = new StringBuilder(context.Cache["xmldemo"].ToString());
            StringBuilder sbitem = new StringBuilder(context.Cache["xmldemoitem"].ToString());
            
            context.Response.ContentType = "text/xml";
            //context.Cache[""].ToString();
            context.Response.Write(sb.Replace("$item$", sbitem.Replace("$title$", "四川爆炸").ToString() + sbitem.Replace("$title$", "四川爆炸1").ToString()
                + sbitem.Replace("$title$", "四川爆炸2").ToString()));
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
